package com.company.day2;
import java.util.Scanner;
//输入三个整数，并用升序排列出来
public class Sort {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.printf("Enter three integer: ");
        int num1 = input.nextInt();
        int num2 = input.nextInt();
        int num3 = input.nextInt();
        if(num1 > num2){
            int a1 = num1;
            num1 = num2;
            num2 = a1;
        }
        if(num2 > num3) {
            int a2 = num2;
            num2 = num3;
            num3 = a2;
        }
        if(num1 > num2){
            int a3 = num1;
            num1 = num2;
            num2 = a3;
        }
        System.out.printf(" The ascending order of the three integer is " + num1 + " "+ num2 + " "+ num3 + " ");
    }
}
